create  table jms_dm.dm_system_unfinished_summary_dt
(  `order_source_name` varchar(255) NULL COMMENT '订单来源名称',
  `end_manage_region_code` varchar(255) NULL COMMENT '末端网点所属管理大区编码',
  `end_manage_region_name` varchar(255) NULL COMMENT '末端网点所属管理大区名称',
  `end_agent_code` varchar(255) NULL COMMENT '末端网点所属代理区编码',
  `end_agent_name` varchar(255) NULL COMMENT '末端网点所属代理区名称',
  `end_franchisee_code` varchar(255) NULL COMMENT '末端网点所属加盟商编码',
  `end_franchisee_name` varchar(500) NULL COMMENT '末端网点所属加盟商名称',
  `final_sign_network_code` varchar(255) NULL COMMENT '最终签收派件网点编码',
  `final_sign_network_name` varchar(500) NULL COMMENT '最终签收派件网点名称',
  `need_sign_count` bigint(20) NULL COMMENT '应签收汇总',
  `finished_count` bigint(20) NULL COMMENT '完结量汇总',
  `unfinished_count` bigint(20) NULL COMMENT '未完结量-汇总',
  `unfinished_third_party` bigint(20) NULL COMMENT '未完结量-第三方对接',
  `unfinished_deliver_out` bigint(20) NULL COMMENT '未完结量-快件取出',
  `unfinished_deliver` bigint(20) NULL COMMENT '未完结量-收派员派件',
  `unfinished_other` bigint(20) NULL COMMENT '未完结量-其他',
  `final_plan_sign_date` date NULL COMMENT '规划签收日期',
  `unfinished_difficult` bigint(20) NULL COMMENT '未完结量-问题件',
  `unfinished_duty_deliver` bigint(20) NULL COMMENT '未完结责任-网点出仓',
  `unfinished_duty_end_network` bigint(20) NULL COMMENT '未完结责任-网点到件',
  `unfinished_duty_end_center` bigint(20) NULL COMMENT '未完结责任-中心发件',
  `end_provider_id`  varchar(255) NULL COMMENT '末端网点所属省份id',
  `end_provider_name` varchar(255) NULL COMMENT '末端网点所属省份名称',
  `end_city_id`  varchar(255) NULL COMMENT '末端网点所属城市id',
  `end_city_name` varchar(255) NULL COMMENT '末端网点所属城市名称',
  `end_area_id`  varchar(255) NULL COMMENT '末端网点所属区县id',
  `end_area_name` varchar(255) NULL COMMENT '末端网点所属区县名称' )
ENGINE=OLAP
DUPLICATE KEY(`order_source_name`)
COMMENT '系统未完结汇总新表'
PARTITION BY RANGE(`final_plan_sign_date`)
(START ('2022-10-31') END ('2023-01-25') EVERY (INTERVAL 1 day)
)
DISTRIBUTED BY HASH(`final_sign_network_code`) BUCKETS 3
PROPERTIES (
'replication_num' = '3',
'dynamic_partition.enable' = 'true',
'dynamic_partition.time_unit' = 'DAY',
'dynamic_partition.time_zone' = 'Asia/Shanghai',
'dynamic_partition.start' = '-180',
'dynamic_partition.end' = '3',
'dynamic_partition.prefix' = 'p',
'dynamic_partition.buckets' = '3',
'in_memory' = 'false',
'storage_format' = 'V2'
);